
//
//  Person.m
//  05-集合遍历-数组的排序
//
//  Created by dllo on 16/7/8.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "Person.h"

@implementation Person
- (NSString *)description{
    return [NSString stringWithFormat:@"姓名:%@ 年龄:%ld", self.name, self.age];
}
- (NSComparisonResult)compareByName:(Person *)anotherPerson{
    return [self.name compare:anotherPerson.name];

}
@end
